//
//  LostPasswardViewController.m
//  LOU
//
//  Created by iMacOne on 15/11/7.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "LostPasswardViewController.h"
#import "Size.h"
#import "ToolUtil.h"
@interface LostPasswardViewController ()
@property (nonatomic, strong)UITextField * phoneNumberTF;
@property (nonatomic, strong)UITextField * codeTF;
@property (nonatomic, strong)UITextField * aNewPasswordTF;
@property (nonatomic, strong)UIButton * sendCode;
@property (nonatomic, strong)UIButton * enterButton;

@end

@implementation LostPasswardViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.tabBarController.tabBar.hidden = YES;
    [ToolUtil createLine:margin_64 superView:self.view lift:0 width:WindowWidth hight:0.5 color:[UIColor grayColor]];

    [self createTitle:@"我的" midTitle:@"找回密码"];
    [self creatView];
    // Do any additional setup after loading the view.
}
- (void)creatView
{
    
    self.phoneNumberTF = [[UITextField alloc] initWithFrame:CGRectMake((WindowWidth - margin_250)/ 2, margin_48 + 64, margin_250,margin_34)];
    //        _phoneNumberTF.borderStyle = UITextBorderStyleRoundedRect;
    _phoneNumberTF.placeholder = @" 请输入手机号码";
    _phoneNumberTF.clearButtonMode = UITextFieldViewModeWhileEditing;
    _phoneNumberTF.backgroundColor = [UIColor whiteColor];
    _phoneNumberTF.inputAccessoryView = nil;
    _phoneNumberTF.font = FONT(14);
    _phoneNumberTF.delegate = self;
    [self.view addSubview:_phoneNumberTF];
    float y1 = [ToolUtil createLine:CGRectGetMaxY(_phoneNumberTF.frame) + 1 superView:self.view lift:_phoneNumberTF.frame.origin.x width:_phoneNumberTF.frame.size.width hight:0.5 color:[UIColor grayColor]];
    
    self.codeTF = [[UITextField alloc] initWithFrame:CGRectMake(_phoneNumberTF.frame.origin.x, y1 + margin_10, margin_160,margin_34)];
    //        _phoneNumberTF.borderStyle = UITextBorderStyleRoundedRect;
    _codeTF.placeholder = @" 请输入验证码";
    _codeTF.clearButtonMode = UITextFieldViewModeWhileEditing;
    _codeTF.backgroundColor = [UIColor whiteColor];
    _codeTF.inputAccessoryView = nil;
    _codeTF.font = FONT(14);
    _codeTF.delegate = self;
    [self.view addSubview:_codeTF];
    
    float y2 = [ToolUtil createLine:CGRectGetMaxY(_phoneNumberTF.frame) + 45  superView:self.view lift:_codeTF.frame.origin.x width:_phoneNumberTF.frame.size.width hight:0.5 color:[UIColor grayColor]];
    
    self.sendCode = [UIButton buttonWithType:UIButtonTypeCustom];
    _sendCode.frame = CGRectMake(CGRectGetMaxX(_codeTF.frame), _codeTF.frame.origin.y - margin_5, margin_90, margin_34);
    _sendCode.backgroundColor = [UIColor blackColor];
    [_sendCode setTitle:@"发送验证码" forState:UIControlStateNormal];
    [_sendCode setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    _sendCode.tag = 300;
    _sendCode.titleLabel.font = FONT(14);
    [self.view addSubview:_sendCode];
    
    self.aNewPasswordTF = [[UITextField alloc] initWithFrame:CGRectMake(_phoneNumberTF.frame.origin.x, y2 + margin_10, margin_160,margin_34)];
    //        _phoneNumberTF.borderStyle = UITextBorderStyleRoundedRect;
    _aNewPasswordTF.placeholder = @" 请输入新的密码";
    _aNewPasswordTF.clearButtonMode = UITextFieldViewModeWhileEditing;
    _aNewPasswordTF.backgroundColor = [UIColor whiteColor];
    _aNewPasswordTF.inputAccessoryView = nil;
    _aNewPasswordTF.font = FONT(14);
    _aNewPasswordTF.delegate = self;
    [self.view addSubview:_aNewPasswordTF];
    
    float y3 = [ToolUtil createLine:CGRectGetMaxY(_phoneNumberTF.frame) + margin_90  superView:self.view lift:_codeTF.frame.origin.x width:_phoneNumberTF.frame.size.width hight:0.5 color:[UIColor grayColor]];
    
    self.enterButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _enterButton.frame = CGRectMake((WindowWidth - margin_140) / 2, CGRectGetMaxY(_aNewPasswordTF.frame) + margin_34, margin_140, margin_34);
    _enterButton.backgroundColor = [UIColor blackColor];
    [_enterButton setTitle:@"确定" forState:UIControlStateNormal];
    [_enterButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    _enterButton.tag = 301;
    [_enterButton addTarget:self action:@selector(doClickButton:) forControlEvents:UIControlEventTouchUpInside];
    _enterButton.titleLabel.font = FONT(14);
    [self.view addSubview:_enterButton];
    
}
- (void)doClickButton:(UIButton *)btn
{
    NSLog(@"确定新密码");
}
- (void)doBack:(UIButton *)btnBack
{
    self.tabBarController.tabBar.hidden = YES;
    [self.navigationController popViewControllerAnimated:YES];
    self.tabBarController.tabBar.hidden = YES;
}
@end
